export function cloneDeep(obj) {
  if (typeof obj !== 'object' || obj === null) {
    return obj
  }
  if (Array.isArray(obj)) {
    return obj.map((item) => cloneDeep(item))
  } else {
    let newObj = {}
    for (let key in obj) {
      newObj[key] = cloneDeep(obj[key])
    }
    return newObj
  }
}
